<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>BFC与浮动元素</title>
  </head>
  <style>
    .float {
      width: 200px;
      height: 200px;
      background-color: red;
      margin: 20px;
      float: left;
    }
    .container {
      height: 500px;
      background-color: aqua;
      overflow: hidden;
    }
  </style>
  <body>
    <div class="float"></div>
    <div class="container"></div>
  </body>
</html>
